/*
	FileName : F205_flash.h
	Description :
	Created on 2013.01.18 by ZZP.

	Revision History:

*/


/**
  ******************************************************************************
  * @file    STM32F2xx_IAP/inc/flash_if.h 
  * @author  MCD Application Team
  * @version V1.0.0
  * @date    02-May-2011
  * @brief   This file provides all the headers of the flash_if functions.
  ******************************************************************************
  * @attention
  *
  * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
  * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
  * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
  * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
  * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
  * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
  *
  * <h2><center>&copy; COPYRIGHT 2011 STMicroelectronics</center></h2>
  ******************************************************************************
  */ 

/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __F205_FLASH_H__
#define __F205_FLASH_H__



/* Includes ------------------------------------------------------------------*/
#include "stdint.h"
#include "stm32f2xx_hal.h"
#include "bsp_flash.h"


#define BIOS_FLASH_WRP_SECTORS		(OB_WRP_SECTOR_0 | OB_WRP_SECTOR_1)
#define PARAM_FLASH_WRP_SECTORS		(OB_WRP_SECTOR_2)



///PARAMS
#define PARAMS_ADDRESS				ADDR_FLASH_SECTOR_2
#define PARAMS_START_SECTOR			ADDR_FLASH_SECTOR_2
#define PARAMS_END_SECTOR			ADDR_FLASH_SECTOR_2


/* Exported macro ------------------------------------------------------------*/
/* Exported functions ------------------------------------------------------- */

uint8_t F205_EraseSectors(uint32_t StartSec, uint32_t EndSec);
uint8_t F205_ProgramFlash(uint32_t addr, uint32_t data);
uint8_t F205_WriteParams(uint32_t addr, uint8_t *data, uint16_t len);
uint8_t F205_ReadParams(uint32_t addr, uint8_t *data, uint16_t len);

#endif  /* __F205_FLASH_H__ */

/*******************(C)COPYRIGHT 2011 STMicroelectronics *****END OF FILE******/





